UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MhVizzOlRd7OdREVK4Zkpw5YVwI/noOHysdyI24503w='
WHERE
key_id = 'c1868fe3ff96611e5bd9b89ac899cf8aaae59adcb954d0573ae0d7193df87245'
AND (
token = 'MhVizzOlRd7OdREVK4Zkpw5YVwI/noOHysdyI24503w='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)