UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+0yOKh1/k2IIO3NXoG9bat4QS/hdXhpqj56hZmF3Azc=' 
WHERE 
  key_id = '2b8791e5164d7f71b3d884a66dc5753b7127bf2f5bbfafba8359e7cb42787bb9' 
  AND (
    token = '+0yOKh1/k2IIO3NXoG9bat4QS/hdXhpqj56hZmF3Azc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00071