UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'V6t/+6TCSuu4b4fhep+fzRDTQEnlH/ejc2BM7a6TKq4='
WHERE
key_id = 'be961a8f3352dd4e6bbf5e2e991de1aa7014f84f76b2c6b795fae24d9f7b13f5'
AND (
token = 'V6t/+6TCSuu4b4fhep+fzRDTQEnlH/ejc2BM7a6TKq4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)