UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NGZeZB6mhNV6EwoG0VBMDh8a9qrTqK7/h5W/9gin1XM='
WHERE
key_id = '35ff159b2c685690fa376c4f7d1c3e73c3e4d692e52ce8db91e71dd34d7efefc'
AND (
token = 'NGZeZB6mhNV6EwoG0VBMDh8a9qrTqK7/h5W/9gin1XM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)