UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'WRbCjGX+FM9APZD6CVyirdfWojzUOKmwfymuwsDnItc=' 
WHERE 
  key_id = '069439db359ca98ef604ed50130b79c48dc179b6b15cad97880bbff17922a531' 
  AND (
    token = 'WRbCjGX+FM9APZD6CVyirdfWojzUOKmwfymuwsDnItc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032