UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cjUU5p19ViaSFanGQ83Lvx94/FvoVbKUZg6pQ6JoWdc='
WHERE
key_id = '0e029735996df9db72917fe15fc785d19a123caa34efedde8c25615cd1ce5473'
AND (
token = 'cjUU5p19ViaSFanGQ83Lvx94/FvoVbKUZg6pQ6JoWdc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)