UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VPXLg8S1d6hTcaR3MhOiGwaN/8OMcFX58HtSdUaIjdA='
WHERE
key_id = 'f5cc855c40666008acc88e63b85aa2568674c875cd562d32fe2ecbce019e3b14'
AND (
token = 'VPXLg8S1d6hTcaR3MhOiGwaN/8OMcFX58HtSdUaIjdA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)