UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zqqd7o9pFuoMOLvm4fgH1ikgStILwV2EieA975h/e6s='
WHERE
key_id = '2be2cb0f20e277700ce6f7082628404325259622cb755de9369b6619ff2f03f3'
AND (
token = 'zqqd7o9pFuoMOLvm4fgH1ikgStILwV2EieA975h/e6s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)