UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WFGTzZWFn8z6nKYXT9LicFGIGRj4kIhpmXK7Sexn7ro='
WHERE
key_id = '903db3e98c5f2f82786c0133c646e8a414ad3cc28dc773fc26036c9d5bccddfc'
AND (
token = 'WFGTzZWFn8z6nKYXT9LicFGIGRj4kIhpmXK7Sexn7ro='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)