UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AnSEoBH1XphBU0TyeEo1jSrvA/UyhAYVeW2YviQrsGk='
WHERE
key_id = '4463634ab041b0a3f8e7fc8aabb81e849a927e9fa8486c00e1f9f1dc426c76a0'
AND (
token = 'AnSEoBH1XphBU0TyeEo1jSrvA/UyhAYVeW2YviQrsGk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)