UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 't/DCiypJisQXPvtZmQWK40qyAB5S803/ayW8jpg5ZSA='
WHERE
key_id = '5be0cf1b093c74c5a2dedd0d1c43428653ff17b7a9d5681bbdca80ce1fdbbdcc'
AND (
token = 't/DCiypJisQXPvtZmQWK40qyAB5S803/ayW8jpg5ZSA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)