UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'snovznP1nJ5o/afXMQlDtQK//X9ZR6SkYS6BRRlOm0o='
WHERE
key_id = 'f76710d1be201e04a63f01a9ce75cffc211cc4b38893ce5b2169d47e3ba586c1'
AND (
token = 'snovznP1nJ5o/afXMQlDtQK//X9ZR6SkYS6BRRlOm0o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)