UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LxKiOKk0bdJj6lx81nzXa+Rr+mLPo7uyktD8zmVE1DU='
WHERE
key_id = '5750b46c124fd9c260efd4bc0087bc224773d3bc361304269bafde4b24c1b28e'
AND (
token = 'LxKiOKk0bdJj6lx81nzXa+Rr+mLPo7uyktD8zmVE1DU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)