UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'e/mezOdXsBud3nFogeK7bYW+lxDgSQblsoh6OwdHpFM='
WHERE
key_id = '042f7b6c69490dfa4c5c050be249f427c3690e0ad16ac47cb8bf2a0b08c29a90'
AND (
token = 'e/mezOdXsBud3nFogeK7bYW+lxDgSQblsoh6OwdHpFM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)