UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'tmrM5muSqY+ol7hV4S4ZaS/oNurXEbtYln2G5Rrmh70=' 
WHERE 
  key_id = 'd563db5c70515e3ca7b7908a71265dd9c0fbd4d843de53954727e9514777f96c' 
  AND (
    token = 'tmrM5muSqY+ol7hV4S4ZaS/oNurXEbtYln2G5Rrmh70=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021