UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VNhcRh9CPU8XA5TV1Y3NWfeeW/jUdoakOZSv6PfQb2A='
WHERE
key_id = '6e2855da3da15281dcbe01c633d0ac78c93f2a33271efdab0cbea915728ccc67'
AND (
token = 'VNhcRh9CPU8XA5TV1Y3NWfeeW/jUdoakOZSv6PfQb2A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)