UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fbjxRSHoiRKeZ3J/SNDFAIpo8TXs9o+qxXoFEIbtQGw='
WHERE
key_id = '2619df33279ceb3dce98734b1a7d2b136a1c976270b2a55a8350d4d832ed2511'
AND (
token = 'fbjxRSHoiRKeZ3J/SNDFAIpo8TXs9o+qxXoFEIbtQGw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)