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