UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wvcQ2XeUamQjwdgdEQE8orNiPxwp1XWAZN1P1Twa3EI='
WHERE
key_id = '61e6673382b060a74916d9b5cfe7d808ea1c85bef3a3e2bbd04f6a4cd952f8cd'
AND (
token = 'wvcQ2XeUamQjwdgdEQE8orNiPxwp1XWAZN1P1Twa3EI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)