UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bpHHOfN2HZ+gi5i1CpimsfAv7yXIgEEEXiueQU18um4='
WHERE
key_id = '60e33a6c8d8b332eb68352e0bd049812d109536cace11f754c6dd4121438f68e'
AND (
token = 'bpHHOfN2HZ+gi5i1CpimsfAv7yXIgEEEXiueQU18um4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)