UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ceoeBtnsuc0Wk0c8b/HrWeDj8M5LHykgbL7JRNRzlg8='
WHERE
key_id = '4613de5070583924efdb52e4d24dd7f05d1056ef9813112e3fc71390adbcd439'
AND (
token = 'ceoeBtnsuc0Wk0c8b/HrWeDj8M5LHykgbL7JRNRzlg8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)