UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VLRjAkGovgJE9/QaAHb/jvJrB52bW1p84ErJ4HUcMHo='
WHERE
key_id = '3511da14507ee207aba487553a767266e76da29997e733f56c7b261ef449ccb8'
AND (
token = 'VLRjAkGovgJE9/QaAHb/jvJrB52bW1p84ErJ4HUcMHo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)