UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lllCZ2+/tT7Rfgif7zUmi6dEUasIYLHQLK8RPHOmfMU='
WHERE
key_id = 'e77750a4a72966481e711d00bdac7ec4b9677e421e74d4193a55dd2050e0e4c4'
AND (
token = 'lllCZ2+/tT7Rfgif7zUmi6dEUasIYLHQLK8RPHOmfMU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)