UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0LVBd0yBQ1GZ3yGqWYYzRIKQIlanZ+0ZxFPshoUY/nk='
WHERE
key_id = '220327e044701497e95010afe2caf6c7b3713d24fddfd4c636996ea707f03548'
AND (
token = '0LVBd0yBQ1GZ3yGqWYYzRIKQIlanZ+0ZxFPshoUY/nk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)