UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NjV6Kvfp94na2uwcTl7y70iN11fP0KEHdU+l4FlyitE='
WHERE
key_id = '90a1055e22c0bc39c22c507848de8039e18c96666ffc10b6344671b5aed684f7'
AND (
token = 'NjV6Kvfp94na2uwcTl7y70iN11fP0KEHdU+l4FlyitE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)