UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'kvPGbS+CiQC+VkoAaYLlu5apYHqG/0u9bESORRv/LXc=' 
WHERE 
  key_id = 'f254c7b49ced09d9d2f1b2ba2c20edd5c73e4072f61a58836ab2dbee9cb15d59' 
  AND (
    token = 'kvPGbS+CiQC+VkoAaYLlu5apYHqG/0u9bESORRv/LXc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00090