UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UOPOY4XW7wT4q2fqR87QQ0BpQ5H0q2bvyQtM/nV9qrY='
WHERE
key_id = 'dbd4bb14627317f00b78221ef00b399818a4ebc70c561e1a54830dfb51daa24f'
AND (
token = 'UOPOY4XW7wT4q2fqR87QQ0BpQ5H0q2bvyQtM/nV9qrY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)