UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'r0xKsHssEwN2JmN3pUzGP0UbNikezrZcAOGAlqwJQbE='
WHERE
key_id = '100fb4060be30a3063e082fb4e7e7b78d136bffa663c09714e596514558bdf93'
AND (
token = 'r0xKsHssEwN2JmN3pUzGP0UbNikezrZcAOGAlqwJQbE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)