UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rXN2Au0+YZXnHHTp4NLP8c+AQUbi+1JMHz15iQ4RQx0='
WHERE
key_id = '2f8ae3abb0e7fa4f82d5be2034fb3b5a605d6a0d2a4fcff46992cab8bd483181'
AND (
token = 'rXN2Au0+YZXnHHTp4NLP8c+AQUbi+1JMHz15iQ4RQx0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)