UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GHRc3Mg2NNw7a/B5l6RFOfc6hvkjs7vhIkKcrlhbGxY='
WHERE
key_id = 'c11ff088cc47e841a6dd8e7459e8306270996ba2687423c8c88039c80483bbb2'
AND (
token = 'GHRc3Mg2NNw7a/B5l6RFOfc6hvkjs7vhIkKcrlhbGxY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)