UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VWNol8qSfrtahV6kNLjt6RvQIJsdMRo11BUwY71UDmM='
WHERE
key_id = 'cc219364eecc403c0c73a7077a3e529f457840acc37d09770630e714681b0453'
AND (
token = 'VWNol8qSfrtahV6kNLjt6RvQIJsdMRo11BUwY71UDmM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)