UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'e+z7KBmyuJQzdbJXR09ZQnCMEzPdqNl2Gy9xNf5zFys='
WHERE
key_id = 'ad06f389083b22f9ffeca7d7c8ac6683e1e348901dab2a4fa8fa9b79dd332e62'
AND (
token = 'e+z7KBmyuJQzdbJXR09ZQnCMEzPdqNl2Gy9xNf5zFys='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)