UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wbl2tTnJQ2Asopupok7Egblgxk+gU+FCLUEP8v2eh98='
WHERE
key_id = '5c1533f2a03f8e707c6ea99b6c04ef9fe2e4d1a310ae6aa850ea088bebc9e134'
AND (
token = 'wbl2tTnJQ2Asopupok7Egblgxk+gU+FCLUEP8v2eh98='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)