SELECTm.*FROMmessenger_messagesmWHERE (m.queue_name=?) AND (m.delivered_atisnullORm.delivered_at<?) AND (m.available_at<=?) ORDER BYavailable_atASCLIMIT1FORUPDATESKIPLOCKED
SELECTm.*FROMmessenger_messagesmWHERE
(m.queue_name=?)
AND (
m.delivered_atisnullORm.delivered_at<?
)
AND (m.available_at<=?)
ORDER BYavailable_atASCLIMIT1FORUPDATESKIPLOCKED
SELECTm.*FROMmessenger_messagesmWHERE (m.queue_name='low_priority') AND (m.delivered_atisnullORm.delivered_at<'2025-01-15 15:12:34') AND (m.available_at<='2025-01-15 16:12:34') ORDER BYavailable_atASCLIMIT1FORUPDATESKIPLOCKED;